package com.xdclass.thread.demo;

/**
 * @Author: Timo
 * @Date: 2019/4/25 16:26
 * @Description: 练习创建线程，直接继承Thread
 */
public class MyThread extends Thread  {
    @Override
    public void run() {
        System.out.println("[" + Thread.currentThread().getName() + "] runing....");
    }

    public static void main(String[] args) {
        Thread thread = new Thread(new MyThread());
        thread.setName("MyThread");
        thread.start();
    }
}
